import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service
//消耗分摊
const request = {
    //根据条件分页查询消耗分摊
    consumeapportionment (params) {
        return httpPost({
            url: '/material/consumptionAllocation/listByEntity',
            params
        })
    },
    //新增消耗分摊
    Addconsumeapportionment (params) {
        return httpPost({
            url: '/material/consumptionAllocation/create',
            params
        })
    },
    //修改消耗分摊
    Editconsumeapportionment (params) {
        return httpPost({
            url: '/material/consumptionAllocation/update',
            params
        })
    },
    //修改消耗分摊明细
    EditconsumeapportionmentList (params) {
        return httpPost({
            url: '/material/consumptionAllocation/updateList',
            params
        })
    },
    //查询分包合同明细
    getConsumptionAllocationDetailed (params) {
        return httpPost({
            url: '/subcontract/thirdParty/getConsumptionAllocationDetailed',
            params
        })
    },
    // 冲红单
    redSingle (billId) {
        return httpGet({
            url: '/material/consumptionAllocation/initRedBill',
            params: {
                billId
            }
        })
    },

}

export default request